<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="id" lang="id">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title> 
</head>
<body>
	<html:form action="/empContactDetailUpdate.do">
		<table width="99%" cellspacing="0" cellpadding="0" border="0">
			<tr>
				<td style="width: 15%;" valign="top">
					<jsp:include page="../common/leftMenu.jsp" />
				</td>

				<td style="width: 83%;" valign="top" >
		<div class="outerbox" style="min-width: 600px;">
			<div class="mainHeading">
				<div class=""
					style="width: 360px; height: 32px; background: url(images/formTitleBackground.png) no-repeat top right; font-color: #CC0000;">
					<h2 class="formTitle">CONTACT DETAILS</h2>
				</div>
			</div>
			<div class="searchbox">
					<div id="formcontent">
						<br class="clear" />
						<table style="width: 100%; padding-bottom: 10px;">
							<tr>
								<td class="txtLabel"><label>Employee Id </label></td>
								<td><html:text property="empNumber" style="width:200px;" readonly="true"></html:text></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Address 1 </label></td>
								<td><html:text property="addressStreet1" style="width:200px;"></html:text></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Address 2 </label></td>
								<td><html:text property="addressStreet2" style="width:200px;"></html:text></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Zip/Postal Code </label></td>
								<td><html:text property="zipCode" style="width:200px;"></html:text></td>
							</tr>
							<tr><td>&nbsp;</td></tr>
							<tr>
								<td class="txtLabel"><label>Province / City</label></td>
								<td>
									<html:select property="provinceCode" styleId="provinceId" style="width:200px;"  onchange="linkedComboBox('provinceId', 'districtId');">
									 	<html:optionsCollection property="allProvinces" label="label" value="value" />
									</html:select>
								</td>
							</tr>
							<tr>
								<td class="txtLabel"><label>District</label></td>
								<td>
									<html:select styleId="districtId" property="districtCode" style="width:200px;">
									 	<html:optionsCollection property="allDistricts" label="label" value="value" />
									</html:select>
								</td>
							</tr>
							<tr><td>&nbsp;</td></tr>
							<tr>
								<td colspan="6"><hr/></td>
								<td></td>
								<td></td>
								<td></td>
							</tr>
							<tr><td>&nbsp;</td></tr>
							<tr>
								<td class="txtLabel"><label>Home Phone</label></td>
								<td><html:text property="homePhone" style="width:200px;"></html:text></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Mobile Phone</label></td>
								<td><html:text property="mobilePhone" style="width:200px;"></html:text></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Work Phone</label></td>
								<td><html:text property="workPhone" style="width:200px;"></html:text></td>
							</tr>
							<tr><td>&nbsp;</td></tr>
							<tr>
								<td colspan="6"><hr/></td>
								<td></td>
								<td></td>
								<td></td>
							</tr>
							<tr><td>&nbsp;</td></tr>
							<tr>
								<td class="txtLabel"><label>Work Email</label></td>
								<td><html:text property="workEmail" style="width:200px;"></html:text></td>
							</tr>
							<tr>
								<td class="txtLabel"><label>Other Email</label></td>
								<td><html:text property="otherEmail" style="width:200px;"></html:text></td>
							</tr>
							<tr><td>&nbsp;</td></tr>
							<tr>
							<td colspan="6"><hr/></td>
								<td></td>
								<td></td>
								<td></td>
							</tr>
							<tr>
								<td class="txtLabel" style="width:150px;"></td>
								<td>
									<logic:equal name="empContactDetailUpdate" value="true" property="success">
										<a style="color: blue;"><bean:write name="empContactDetailUpdate" property="message"/></a>
									</logic:equal>
									<logic:equal name="empContactDetailUpdate" value="false" property="success">
										<a style="color: red;"><bean:write name="empContactDetailUpdate" property="message"/></a>
									</logic:equal>
								</td>
							</tr>
						</table>
					</div>
					<logic:equal name="empContactDetailUpdate" value="true" property="updatable">
						<div class="actionbar_form" style="border-top: 2px solid #191919;">
							<div class="actionbuttons">
								<html:submit styleClass="plainbtn" property="btnUpdate" value="Update">Save</html:submit> 
								<html:reset styleClass="plainbtn">Reset</html:reset>
							</div>
						</div>
					</logic:equal>
					<br class="clear" />
			</div>
		</div>
		</td>
		</tr>
		</table>
	</html:form>
</body>
</html>